package com.xuxueli.applyModules.entity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("sys_log")
@ApiModel(value="系统操作日志", description="系统操作日志")
public class SysLog implements Serializable {

	private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "操作者")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "操作内容")
    @TableField("operation")
    private String operation;

    @ApiModelProperty(value = "操作方法")
    @TableField("method")
    private String method;

    @ApiModelProperty(value = "操作参数")
    @TableField("params")
    private String params;

    @ApiModelProperty(value = "操作IP")
    @TableField("ip")
    private String ip;

    @ApiModelProperty(value = "操作时间")
    @TableField("operation_time")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date operationTime;

    @ApiModelProperty(value = "类型T：教师 B：本科生 Y：研究生")
    @TableField("type")
    private String type;
}